<section class="sidebar">
    <div class="user-panel">
        <div class="pull-left image">
            <img src="{{portrait user.image}}" class="img-circle" alt="User Image">
        </div>
        <div class="pull-left info">
            <a href="#/public_my" style="color: #00a0e9; font-size: 14px; line-height: 20px;">
                <div style="max-width: 50px; overflow: hidden; float:left;">{{or user.nickname user.tel}}</div>
                <i class="fa fa-fw fa-edit"></i>
            </a>
            <a class="logout" href="javascript:;">退出登录</a>
        </div>
    </div>
    <ul class="sidebar-menu">
        {{#if menus.length}}
            {{#each menus}}
                <li class="header">{{text}}</li>
                {{#each menus}}
                    {{#if sub_menus}}
                        <li class="treeview">
                            <a href="#">
                                <i class="fa {{icon}}"></i> <span>{{text}}</span> <i
                                    class="fa fa-angle-left pull-right"></i>
                                <span class="label bg-yellow pull-right"></span>
                            </a>
                            <ul class="treeview-menu">
                                {{#each sub_menus}}
                                    <li><a href="{{href}}"><i class="fa {{icon}}" style="width: 20px;"></i>{{text}}</a>
                                    </li>
                                {{/each}}
                            </ul>
                        </li>
                    {{^}}
                        <li><a href="{{href}}"><i class="fa {{icon}}"></i> <span>{{text}}</span> <span
                                class="label bg-yellow pull-right"></span></a></li>
                    {{/if}}
                {{/each}}
            {{/each}}
        {{/if}}
    </ul>
</section>